home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 April / Gamestar_61_2004-04_dvdb.iso / DVDStar / Editace / hltp.exe / {app} / Applications / QuArK / plugins / mappage3d.py < prev    next >
Text File  |  2004-01-05  |  2KB  |  79 lines

  1. """   QuArK  -  Quake Army Knife
  2.  
  3. Map editor "3D" page on the Multi-Pages-Panel.
  4. """
  5. #
  6. # Copyright (C) 1996-99 Armin Rigo
  7. # THIS FILE IS PROTECTED BY THE GNU GENERAL PUBLIC LICENCE
  8. # FOUND IN FILE "COPYING.TXT"
  9. #
  10.  
  11. #$Header: /cvsroot/quark/runtime/plugins/mappage3d.py,v 1.6 2003/07/07 07:17:46 cdunde Exp $
  12.  
  13.  
  14. Info = {
  15.    "plug-in":       "3D Page",
  16.    "desc":          "Displays the 3D page (bottom left).",
  17.    "date":          "31 oct 98",
  18.    "author":        "Armin Rigo",
  19.    "author e-mail": "arigo@planetquake.com",
  20.    "quark":         "Version 5.1" }
  21.  
  22.  
  23. import quarkpy.qhandles
  24. from quarkpy.mapmgr import *
  25.  
  26.  
  27. class Page3D(MPPage):
  28.  
  29.     def bs_3Dview(self, panel):
  30.         fp = panel.newpanel()
  31.         # fp.newtoppanel(ico_maped_y,0).newbtnpanel([    ])   # fill me
  32.         self.mppview3d = fp.newmapview()
  33.         quarkpy.qhandles.flat3Dview(self.mppview3d, self.layout, 1)
  34.         setprojmode(self.mppview3d)
  35.         return fp
  36.  
  37.     def fill3dview(self, reserved):
  38.         list = self.layout.explorer.sellist
  39.         self.mppview3d.invalidate(1)
  40.         scale1, center1 = AutoZoom([self.mppview3d], quarkx.boundingboxof(list))
  41.         if scale1 is not None:
  42.             setviews([self.mppview3d], "scale", scale1)
  43.             self.mppview3d.screencenter = center1
  44.         quarkpy.qhandles.z_recenter(self.mppview3d, list)
  45.  
  46.     def button(self):
  47.         pagebtn = qtoolbar.button(self.fill3dview, "3D view||3D view:\n\nThis displays a 3D texture view of the selected objects.\n\nSee the infobase for more detail.", ico_dict['ico_maped'], 21, "3D view", infobaselink='intro.mapeditor.dataforms.html#3dview')
  48.         pagebtn.pc = [self.bs_3Dview(self.panel)]
  49.         return pagebtn
  50.  
  51.  
  52.  
  53. # Register this new page
  54. mppages.append(Page3D)
  55.  
  56.  
  57. # ----------- REVISION HISTORY ------------
  58. #
  59. #
  60. # $Log: mappage3d.py,v $
  61. # Revision 1.6  2003/07/07 07:17:46  cdunde
  62. # To correct caption exclusion error and hint display
  63. #
  64. # Revision 1.5  2003/03/17 01:48:49  cdunde
  65. # Update hints and add infobase links where needed
  66. #
  67. # Revision 1.4  2001/10/22 10:14:25  tiglari
  68. # live pointer hunt, revise icon loading
  69. #
  70. # Revision 1.3  2001/01/26 19:08:02  decker_dk
  71. # Fix hint-problem introduced by change in [QBaseMgr.PY] bs_multipagespanel
  72. #
  73. # Revision 1.2  2000/06/03 10:25:30  alexander
  74. # added cvs headers
  75. #
  76. #
  77. #
  78. #
  79.